<?php
namespace BoxApi\Controller;

use Think\Controller;

class KindeditorController extends CommonController
{
    /****Kindeditor图片上传***/

    public function uploadJson()
    {
            $param=array('type'=>'return');
            $data=hook("Upload/Index/upload",$param);
            header('Content-type: text/html; charset=UTF-8');
        if($data['error']==0){
            echo json_encode(array('error' => 0, 'url' => $data['data']['file_url']));
        }else{
            echo json_encode(array('error' =>$data['error'] , 'msg' => $data['msg']));
        }
        exit;


    }




}

?>